export default {
	data() {
		return {
			version: '',
			envVersion: ''
		}
	},
	async onLoad(options) {
		console.log("setting index onLoad: ", options); // 条件编辑只在微信小程序显示
		// #ifdef MP-WEIXIN
		const accountInfo = wx.getAccountInfoSync();
		console.log('accountInfo ', accountInfo);
		this.version = accountInfo.miniProgram.version; // 小程序 版本号
		this.envVersion = accountInfo.miniProgram.envVersion;
		console.log('小程序版本号', accountInfo.miniProgram.version);
		// #endif

	},
	async onShow() {},
	onHide() {},
	methods: {
		onMiniOut() {
			console.log('onMiniOut');
			uni.exitMiniProgram({
				success: function() {
					console.log('退出小程序成功');
				},
				fail: function(err) {
					console.log('退出小程序失败', err);
				}
			})
		}
	},
}